package com.example.coco.Controller;

import com.example.coco.model.Suggestion;
import com.example.coco.res.SuggestionMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
@ResponseBody
public class Show {
    @Autowired
    private SuggestionMapper suggestionMapper;
    @RequestMapping("/shows")
    public List<Suggestion> showSuggestions(){
        return suggestionMapper.showsug();
    }

}